﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Remoting.Messaging;
using System.Speech.Synthesis;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Media;
using System.Windows.Media.Media3D;
using LocalServer.Model;
using Microsoft.Office.Interop.Excel;
using Newtonsoft.Json.Linq;
using WpfApp2;
using static System.Net.Mime.MediaTypeNames;

namespace LocalServer.Utils
{
    public class MessageDealUtils
    {
        static SpeechSynthesizer speechSynthesizer = null;
        public static string messageDeal(JObject jObject)
        {

            JObject jsonObj = JObject.Parse(jObject.ToString());
            String type = (String)jsonObj.GetValue("type");
            String direction = (String)jsonObj.GetValue("direction");
            string MacCard="";

            //读取物理卡号
            if ("ReplaceCard".Equals(type))
            {
          /*      int code1 = NewIDcardread.CardAuthentication();//身份认证
                NewCardInfo newCardInfo = NewIDcardread.ReadIDcard();*/
                StringBuilder driverMacCard = new StringBuilder(16);
                int code = NewIDcardread.ReadIINSNDN(driverMacCard);
                MacCard= driverMacCard.ToString();
            }
            return MacCard;
         }
    }
}

